package com.wondertek.poms.dao.pojo;

import com.wondertek.poms.common.utils.excel.annotation.ExcelField;
import com.wondertek.poms.common.utils.validate.GroupType;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.groups.Default;

/**
 * @author:W5349
 * @date:2021/1/25
 */
@Data
public class BcInfoExcelPojo {

    @ExcelField(title = "播控方ID", align = 2, sort = 1)
    @Range(message = "播控方id仅支持6位数字",min = 100000, max = 999999 , groups = {Default.class, GroupType.Update.class})
    private Long bcId;        //播控方ID
    @ExcelField(title = "播控方名称", align = 2, sort = 1)
    @NotBlank(message = "播控方名称不能为空", groups = {Default.class})
    @Length(message = "播控方名称长度不能超过30个字节", max=30, groups = {Default.class, GroupType.Update.class})
    private String name;      //播控方名称
    @ExcelField(title = "播控方手机号", align = 2, sort = 1)
    @Pattern(message = "播控方手机号仅支持11位数字", regexp = "[0-9]{11}", groups = {Default.class, GroupType.Update.class})
    private String mobile;    //播控方手机号
    @ExcelField(title = "用户类型", align = 2, sort = 1)
    private String userType;   //用户类型
    @ExcelField(title = "用户id", align = 2, sort = 1)
    private Long userId;    //用户id
    @ExcelField(title = "用户名", align = 2, sort = 1)
    private String userName;  //用户名
    @ExcelField(title = "一级分类", align = 2, sort = 1)
    private String firstClassify;  //一级分类
    @ExcelField(title = "版权归属CP", align = 2, sort = 1)
    private String copyRightCpId;   //版权归属CP
    @ExcelField(title = "推荐标签", align = 2, sort = 1)
    private String recommendation;  //推荐标签
    @ExcelField(title = "创建者", align = 2, sort = 1)
    private String creator;   //创建者
    @ExcelField(title = "创建时间", align = 2, sort = 1)
    private String creatTime;  //创建时间
}
